import { AxiosResponse } from 'axios';

export default function (
  response: AxiosResponse
): AxiosResponse | Promise<AxiosResponse> {
  const decryptData = response.data;

  if (decryptData.status === 200) {
    // console.log('返回：',decryptData.data)
    return Promise.resolve(decryptData.data);
  }

  return Promise.reject(new Error(decryptData.msg));
}
